package spring6.iocxml.ditest;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestEmp {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean-ditest.xml");
//        外部引入bean
        Emp emp = context.getBean("emp",Emp.class);
        emp.work();
//        内部引入bean
        Emp emp2 = context.getBean("emp2",Emp.class);
        emp2.work();
    }
}
